<template>
  <Select @on-change="changeInput" :value="value" disabled>
    <Option v-for="item in source" :value="item.key" :key="item.key">{{ item.value }}</Option>
  </Select>
</template>

<script>
export default {
  props: ['value'],
  data() {
    return {
      source: [
        { key: 'STRING', value: '字符串-STRING' },
        { key: 'TEXT', value: '富文本-TEXT' },
        { key: 'INTEGER', value: '整型-INTEGER' },
        { key: 'BOOLEAN', value: '布尔值-BOOLEAN' },
        { key: 'DOUBLE', value: '双精度浮点数-DOUBLE' },
        { key: 'DATE', value: '日期-DATE' },
        { key: 'ENUM', value: '枚举-ENUM' },
      ],
    }
  },
  methods: {
    changeInput(val) {
      this.$emit('input', val)
    },
  },
}
</script>

<style>
</style>